🚀 Open Source MIT Licensed

Transform SQL schemas into production-ready Go microservices

Generate complete Go services with hexagonal architecture from your database schema in seconds. Includes REST API, database migrations, Docker setup, and clean architecture patterns.

Instant Generation
🏗️
Hexagonal Architecture
🐳
Docker Ready
Terminal
$ go run . user-service schema.sql
🚀 Creating hexagonal architecture for module: user-service
📋 Found 3 tables in SQL schema
✅ Generated complete Go service with:
  • REST API endpoints
  • Database repositories
  • Business logic layer
  • Docker configuration
🎉 Successfully created user-service!

Why Choose boGO?

When you need a Go microservice, the architecture choice should be obvious

Obviously Correct

True hexagonal architecture, not just layered naming. Proper dependency inversion and clean separation of concerns.

Obviously Clean

Unified interfaces, complete DTO mapping, comprehensive linting. Code that's maintainable from day one.

Obviously Testable

Every layer mockable through proper interface separation. Complete test examples included.

Obviously Maintainable

Clear layer boundaries with consolidated adapter files. Easy to understand and modify.

Production Ready

Docker integration, health checks, audit trails, and monitoring endpoints built-in.

Obviously Scalable

Proper dependency inversion enabling easy technology swaps and horizontal scaling.

Hexagonal Architecture

True ports and adapters pattern for maintainable, testable, and scalable Go services

Domain Layer

/domain
Entities
Interfaces
Business Rules

Interactor Layer

/interactor
Use Cases
Business Logic
Orchestration

Repository

/repository
Database
Queries
Migrations

REST API

/rest
Handlers
Middleware
DTOs

Get Started in 30 Seconds

From SQL schema to running microservice in less than a minute

1

Clone boGO

git clone https://github.com/WithBogo/bogo
cd bogo
2

Prepare Your SQL Schema

CREATE TABLE users (
    id BIGSERIAL PRIMARY KEY,
    name VARCHAR(255) NOT NULL,
    email VARCHAR(255) UNIQUE NOT NULL,
    created_at TIMESTAMPTZ DEFAULT NOW()
);
3

Generate Your Service

go run . user-service schema.sql
4

Run Your Service

cd user-service
docker-compose up -d

🎉 You now have a complete Go microservice with:

✅ REST API endpoints
✅ Database layer
✅ Business logic
✅ Docker setup
✅ Health checks
✅ Database migrations

Try boGO Online

Test boGO directly in your browser without any installation

💌 Enter your email to receive the generated code files directly in your inbox

Generated Files Preview

user-service/
├── domain/
│   ├── user.go
│   ├── post.go
│   └── interfaces.go
├── repository/
│   ├── user_repository.go
│   └── post_repository.go
├── interactor/
│   ├── user_interactor.go
│   └── post_interactor.go
├── rest/
│   ├── user_handler.go
│   ├── post_handler.go
│   └── middleware.go
├── application/
│   └── main.go
├── migration/
│   └── 001_initial.sql
├── docker-compose.yml
├── Dockerfile
└── go.mod
// domain/user.go
package domain

import "time"

type User struct {
    ID        int64     `json:"id"`
    Name      string    `json:"name"`
    Email     string    `json:"email"`
    CreatedAt time.Time `json:"created_at"`
}

type UserRepository interface {
    Create(user *User) error
    GetByID(id int64) (*User, error)
    GetAll() ([]*User, error)
    Update(user *User) error
    Delete(id int64) error
}
// rest/user_handler.go
package rest

func (h *UserHandler) CreateUser(w http.ResponseWriter, r *http.Request) {
    var req CreateUserRequest
    if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
        http.Error(w, "Invalid JSON", http.StatusBadRequest)
        return
    }

    user := &domain.User{
        Name:  req.Name,
        Email: req.Email,
    }

    if err := h.userInteractor.CreateUser(user); err != nil {
        http.Error(w, err.Error(), http.StatusInternalServerError)
        return
    }

    w.Header().Set("Content-Type", "application/json")
    json.NewEncoder(w).Encode(user)
}
# Dockerfile
FROM golang:1.23-alpine AS builder

WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download

COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o main ./application

FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/

COPY --from=builder /app/main .
EXPOSE 8080

CMD ["./main"]

Real-World Examples

See how boGO generates production-ready services for different use cases

E-commerce API

REST + Database

Complete e-commerce backend with products, orders, and inventory management.

JWT Auth CRUD Operations Validation
View Example →

User Management

Authentication

User registration, login, profile management with role-based access control.

RBAC Password Hash Sessions
View Example →

IoT Data Service

Time Series

IoT device data collection with time-series storage and analytics endpoints.

Time Series Aggregations Real-time
View Example →

Documentation

Everything you need to master boGO and hexagonal architecture

Quick Start Guide

Get up and running with boGO in minutes

Read Guide →

Architecture Guide

Deep dive into hexagonal architecture patterns

Learn More →

API Reference

Complete reference for generated APIs

View Docs →

Best Practices

Production tips and recommended patterns

Best Practices →

Transform Your Legacy Systems with Expert Support

Don't let legacy systems hold your business back. Our boGO experts help you modernize with confidence, speed up development, and ensure your team masters Go microservices architecture.

Legacy Migration & Development Support

Transform your monolithic applications into scalable Go microservices. Our experts guide your migration strategy, ensuring zero downtime and improved performance.

Training & Workshops

Empower your development team with hands-on Go microservices training. From hexagonal architecture principles to production deployment best practices.

Priority Support

Get fast-track support when you need it most. Direct access to boGO architects for code reviews, troubleshooting, and performance optimization.

Custom Development Solutions

Need something beyond standard boGO? We build custom code generators, specialized templates, and integration solutions tailored to your unique requirements.

Why Choose boGO Professional Services?
Reduce migration risks by 80% • Cut development time in half • Ensure production-ready architecture from day one • Build internal Go expertise that lasts

* Don't worry, you can still utilize boGO for free! Our professional services are optional add-ons for teams who need extra support and guidance.

Ready to build better Go services?

Join developers who are building scalable, maintainable microservices with boGO